<template>
    <div>
        演示地址：http://xheditor.com/demo.html
          <textarea id="elm1" name="elm1" class="xheditor" rows="12" cols="80" style="width: 80%" ref="testeditor"
                  ></textarea>

        <Button @click="getText">获取文本值</Button>
        <hr/>
        {{content}}
    </div>
</template>
<script>

    export default{

        components: {},
        data: function () {
            return {
                content: "<h1>1111</h1>"
            }
        },
        computed: {},
        created: function () {

        },
        mounted() {
            $("#elm1").xheditor();
            $("#elm1").val(this.content);
            $("#elm1").focus();

        },

        methods: {
            getText(){
                this.content = $("#elm1").val();
            }
        }
    }
</script>
<style>

</style>
